package edu.colorado.csci5548.gps_messenger;

public class LocationMessage extends Message
{
	private Location _location;
	
	// constructors
	LocationMessage(String message, Location location)
	{
		super(message);
		_location = new Location(location);
	}
	
	LocationMessage(String message)
	{
		this(message, new Location());
	}
	
	LocationMessage(Location location)
	{
		this("", location);
	}
	
	LocationMessage()
	{
		this("", new Location());
	}
	
	LocationMessage(LocationMessage locationMessage)
	{
		this(locationMessage.getMessage(), locationMessage.getLocation());
	}
	
	// getters
	public Location getLocation()
	{
		return new Location(_location);
	}
	
	// setters
	public void setLocation(Location location)
	{
		_location = new Location(location);
	}
	
	// other methods
	public String toString()
	{
		return "Location Message: " + getMessage() + "\n" +
				"Location: " + _location;
	}
}
